/**
 *	定义请求的的路由
 *	开发者：雨中磐石
 *	地址：www.rockoa.com
 *	日期：2023-07-19
 */


package com.framerock.server;


import com.framerock.baselib.Rock;
import java.util.Map;

public class HttpRouter{


    private static Map<String, String> routerMap= null;

    public static String getRouter(String path)
    {
        if(routerMap == null){
            routerMap = Rock.getMap();
            routerMap.put("/", "/Index/index");//默认路由定义
        }
        if(Rock.isEmpt(path))return "";
        String action = routerMap.get(path);
        if(Rock.isEmpt(action))action = "";
        return action;
    }
}